import React from 'react';
import { Button } from 'antd';

export default class App extends React.Component {
state = {
    loading: false,
    iconLoading: false,
  }

  render() {
    return (
      <div>
        <Button type="primary" loading> Loading </Button>
        <Button type="primary" size="small" loading> Loading </Button>
        <br />
        <Button type="primary" loading={this.state.loading} onClick={(e)=> {this.setState(({loading})=>({loading:!loading}))}}> Click me! </Button>
        <Button type="primary" icon="poweroff" loading={this.state.iconLoading} 
        onClick={(e)=> {this.setState(({loading})=>({loading:!loading}))}} > Click me! </Button>
        <br />
        <Button type="primary" loading />
        <Button type="primary" shape="circle" loading />
        <Button type="danger" shape="round" loading />
      </div>
    );
  }
}